#ifndef SEGMENT3D_H
#define SEGMENT3D_H

#include "Point3D.h"
#include "Vector3D.h"

namespace geom
{
    /** Represents a segment in a 3D space, originating from one point, and 
      ending in another */
    class Segment3D
    {
        protected:
            /** Segment origin */
            Point3D p;

            /** Segment vector */
            Vector3D v;

        public:
            /** Constructor
                @param from Origin of the segment
                @param to End of the segment */
            Segment3D(const Point3D &from, const Point3D &to);
            /** Constructor
              @param origin Origin of the segment
              @param vec The vector from origin to end */
            Segment3D(const Point3D &origin, const Vector3D &vec);

            /** Gets the origin of the segment */
            Point3D start() const;
            /** Gets the end of the segment */
            Point3D end() const;
        
            /** Gets the direction from origin to end */ 
            Vector3D direction() const;
    };

}

#endif
